package models;

import play.db.jpa.*;
import play.data.validation.*;
import javax.persistence.*;

@Entity
@Table(name="User")
public class User extends Model {
    
    @Required
    @MaxSize(15)
    @MinSize(4)
    //@Match(value="^\\w*$", message="Not a valid username")
    public String usermail;
    
    @Required
    @MaxSize(40)
    public String name;
   
    public User(String name, String usermail) {
        this.name = name;
        this.usermail = usermail;
    }

    public String toString()  {
        return "User(" + usermail + ")";
    }
    
}
